import instance from '../../utils/axios'


// 获取token函数
function userLogin({
    mobile,
    code
}) {
    return instance({
        url: '/v1_0/authorizations',
        method: 'post',
        data: {
            mobile,
            code
        }
    })
}
import {
    getToken
} from '../../utils/token'
// 获取用户信息函数
function getUserInfo() {
    return instance({
        url: '/v1_0/user/profile',
        method: 'get',
        // 设置请求头

    })
}


function editUserInfo(data) {
    return instance({
        url: '/v1_0/user/profile',
        method: 'PATCH',
        data,

    })
}

function editUserPhoto(fd) {
    return instance({
        url: '/v1_0/user/photo',
        method: 'PATCH',
        data: fd,

    })
}
//导出接口
export {
    userLogin
}
export {
    getUserInfo
}
export {
    editUserInfo
}
export {
    editUserPhoto
}